<!DOCTYPE html>
<html>

    <head>
        <meta charset="UTF-8">
        <title></title>
        <script type="text/javascript" src="../lib/vue.min.js" ></script>
    </head>

    <body>
        <div id="app">
            <h1>Hello App!</h1>
            <p>
                <!-- 使用指令 v-link 进行导航。 -->
                <a v-link="{ path: '/foo' }">Go to Foo</a>
                <a v-link="{ path: '/bar' }">Go to Bar</a>
            </p>
            <!-- 路由外链 -->
            <router-view></router-view>
        </div>
        
        <script>
            var Vue = require('vue')
            var VueRouter = require('vue-router')
            Vue.use(VueRouter)
            
            var Home = Vue.extend({
                template:'<p>这是首页</p>'
            });

            var About = Vue.extend({
                template:'<p>这是关于我们</p>'
            });
            
            var App = Vue.extend({});
            
            var router = new VueRouter()
            
        </script>
    </body>

</html>